package com.nextwist.impl;

import javax.ws.rs.core.Response;

import com.nexttwist.common.BaseException;
import com.nexttwist.common.Util;
import com.nextwist.dao.NotificationDAO;
import com.nextwist.interfaces.INotificationInterface;

public class NotificaitonImpl implements INotificationInterface {

	NotificationDAO notificationDAO = new NotificationDAO();
	
	@Override
	public Response getNotifications(int userId) {
		try{
			return Util.successResponse(notificationDAO.getNotifications(userId));
		}catch (BaseException e) {
			return Util.failureResponse(e.getMessage());
		} catch (Exception e) {
			return Util.failureResponse(e.getMessage());
		}
	}

}
